#ifndef _NTC_H
#define _NTC_H

/*
  Author:     Nima Askari
  WebSite:    http://www.github.com/NimaLTD
  Instagram:  http://instagram.com/github.NimaLTD
  Youtube:    https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw
  
  Version:    1.0.0
  
  
  Reversion History:
  
  (1.0.0)
  First release.
*/

#include <stdint.h>
typedef struct {
    float r_series;      // 分压电阻值
    float r_nominal;     // NTC标称电阻值
    float temp_nominal;  // NTC标称温度
    uint32_t adc_max;    // ADC最大值
    float beta;          // B值
} NTC_Config_t;

float ntc_convertToC(uint32_t adcValue, const NTC_Config_t *config);
float ntc_convertToF(uint32_t adcValue, const NTC_Config_t *config);
  
#endif

